﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Happy.Web.Mvc.Newtonsoft
{
    /// <summary>
    /// 泛型版本的反序列化的后续处理器。
    /// </summary>
    public abstract class DeserializePostProcesser<T> : IDeserializePostProcesser
    {
        /// <inheritdoc />
        public object OnDeserialized(object result)
        {
            return (T)this.OnDeserialized((T)result);
        }

        /// <summary>
        /// 泛型版本的后续处理逻辑。
        /// </summary>
        protected abstract T OnDeserialized(T result);
    }
}
